//This class handles file logs. This class creates files in a similar
//manner to that of SessionManager. Thereafter it writes logs to the
//.txt file.

//The APIs of this class are given below:
//	1. setFileName(string fileName);
//	2. logInfo(string message);

//Notes:
//1. Each component contains its own file log as storage is already 
//implemented as a singleton. Implementing logger as a singleton
//requires thread handling, hence this group decided to implement
//the logger class within each component.

#ifndef LOGGER_H_
#define LOGGER_H_

#include <fstream>
#include <istream>
#include <QDir>
#include <string>
#include <QDateTime>

using namespace std;

#define TOGGLETASK_DIR "C:/toggletask"
#define FILE_NAME_STORAGE_LOGGER "StorageLog.txt"
#define FILE_NAME_LOGIC_LOGGER "LogicLog.txt"
#define FILE_NAME_UI_LOGGER "UILog.txt"
#define FILE_NAME_SESSION_MANAGER_LOGGER "SessionManagerLog.txt"
#define FILE_NAME_TASK_MANAGER_LOGGER "TaskManagerLog.txt"
#define INITIALIZATION_MESSAGE "Logger initialized"
#define SEPARATOR ": "

class Logger {
private:
	ofstream logger;

public:
	void setFileName(string fileName);
	void logInfo(string message);
};

#endif
